package com.sxit.tdf.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户表
 *
 * @author 橙子高🍊
 * @since 2022-02-05
 */
@TableName("tb_user")
@Schema(name = "User对象", description = "用户表")
public class User implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键")
  @TableId(value = "id", type = IdType.ASSIGN_UUID)
  private String id;

  @Schema(description = "手机号")
  private String phone;

  @Schema(description = "昵称 这里指代真实的姓名")
  private String name;

  @Schema(description = "性别 1 男 2女 3 未知")
  private String sex;

  @Schema(description = "邮箱")
  private String email;

  @Schema(description = "用户的状态 1 可用 0 不可用  2已经毕业 3 退学")
  private Integer statu;

  @Schema(description = "是否是超级管理员 1是 0不是")
  private Boolean root;

  @Schema(description = "创建用户时间")
  private LocalDateTime createTime;

  @Schema(description = "更新用户信息时间")
  private LocalDateTime updateTime;

  @Schema(description = "系别 或者部门id 1：1")
  private Integer deptId;

  @Schema(description = "角色 比如 [1,0]的样式 一个用户可以对应多个角色 一个角色可以对应多个用户")
  private Integer roleId;

  @Schema(description = "密码")
  private String password;

  @Schema(description = "账户")
  private String username;

  @Schema(description = "头像")
  private String portrait;

  @Schema(description = "学号")
  private String num;

  @Schema(description = "专业ID")
  private Integer professionId;

  @Schema(description = "专业ID")
  private int classesId;

  @Override
  public String toString() {
    return "User{"
        + "id='"
        + id
        + '\''
        + ", phone='"
        + phone
        + '\''
        + ", name='"
        + name
        + '\''
        + ", sex='"
        + sex
        + '\''
        + ", email='"
        + email
        + '\''
        + ", statu="
        + statu
        + ", root="
        + root
        + ", createTime="
        + createTime
        + ", updateTime="
        + updateTime
        + ", deptId="
        + deptId
        + ", roleId="
        + roleId
        + ", password='"
        + password
        + '\''
        + ", username='"
        + username
        + '\''
        + ", portrait='"
        + portrait
        + '\''
        + ", num='"
        + num
        + '\''
        + ", professionId="
        + professionId
        + ", classesId="
        + classesId
        + '}';
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getSex() {
    return sex;
  }

  public void setSex(String sex) {
    this.sex = sex;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public Integer getStatu() {
    return statu;
  }

  public void setStatu(Integer statu) {
    this.statu = statu;
  }

  public Boolean getRoot() {
    return root;
  }

  public void setRoot(Boolean root) {
    this.root = root;
  }

  public LocalDateTime getCreateTime() {
    return createTime;
  }

  public void setCreateTime(LocalDateTime createTime) {
    this.createTime = createTime;
  }

  public LocalDateTime getUpdateTime() {
    return updateTime;
  }

  public void setUpdateTime(LocalDateTime updateTime) {
    this.updateTime = updateTime;
  }

  public Integer getDeptId() {
    return deptId;
  }

  public void setDeptId(Integer deptId) {
    this.deptId = deptId;
  }

  public Integer getRoleId() {
    return roleId;
  }

  public void setRoleId(Integer roleId) {
    this.roleId = roleId;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getPortrait() {
    return portrait;
  }

  public void setPortrait(String portrait) {
    this.portrait = portrait;
  }

  public String getNum() {
    return num;
  }

  public void setNum(String num) {
    this.num = num;
  }

  public Integer getProfessionId() {
    return professionId;
  }

  public void setProfessionId(Integer professionId) {
    this.professionId = professionId;
  }

  public int getClassesId() {
    return classesId;
  }

  public void setClassesId(int classesId) {
    this.classesId = classesId;
  }
}
